import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    meta: { hidden: true },
    redirect: '/login'
  },
  {
    path: '/Administrator',
    meta: { title: '管理员管理', left: true, Index: 0 },
    component: () => import('../pages/Administrator/index.vue')
  }, {
    path: '/role',
    meta: { title: '角色管理', left: true, Index: 1 },
    component: () => import('../pages/role/index.vue')
  }, {
    path: '/user',
    meta: { title: '用户管理', left: true, Index: 2 },
    component: () => import('../pages/user/index.vue')
  }, {
    path: '/banner',
    meta: { title: 'banner管理', left: true, Index: 3 },
    component: () => import('../pages/banner/index.vue')
  }, {
    path: '/login',
    meta: { hidden: true },
    component: () => import('../pages/login/index.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router